CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

include_directories(${COMN_DIR}/include)
include_directories(include)
include_directories(${GLOOX_DIR}/src)
include_directories(${PROJECT_ROOT}/RtpCaster)

link_directories(${COMN_DIR}/lib)
link_directories(${GLOOX_DIR}/lib)
link_directories(${PROJECT_ROOT}/lib)

aux_source_directory(. SOURCES)

add_library(LiveDevice SHARED ${SOURCES})

target_link_libraries(LiveDevice
	${LIB_PLATFORM}
	debug comnd optimized comn
	RtpCaster
	gloox
	)
	
#cmake_policy(SET CMP0022 OLD)
set_target_properties(LiveDevice PROPERTIES LINK_INTERFACE_LIBRARIES "")
set_target_properties(LiveDevice PROPERTIES INTERFACE_LINK_LIBRARIES "")


if(CMAKE_TOOLCHAIN_FILE AND EXISTS ${CMAKE_STRIP})
add_custom_command(TARGET LiveDevice
        POST_BUILD
        COMMAND ${CMAKE_STRIP} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libLiveDevice.so
        )
endif()

install(TARGETS LiveDevice DESTINATION .)